package jsyf.oa.entity.psi;

import com.alibaba.fastjson.JSONObject;

import javax.persistence.Entity;
import javax.persistence.Table;

import jsyf.oa.ientity.BaseEntity;

import java.util.Date;

/**
 * Created by Maqiuqiu on 2018/10/20.
 */
@Entity
@Table(name = "t_psi_repo_in_out", schema = "oa", catalog = "")
public class RepoInOutMainEntity extends BaseEntity {

    private String date;
    private String companyId;
    private String companyName;
    private String departId;
    private String departName;
    private String goodsId;
    private String sourceUrl;
    private String imageUrl;
    private Integer count;
    private String inventoryAddress;
    private String totalPrice;
    private String keeperUserId;
    private String inUserId;
    private String outUserId;
    private String receiveUserId;
    private String keeperUserName;
    private String inUserName;
    private String outUserName;
    private String receiveUserName;
    private String receiveDate;
    private String receiveUrl;
    private String remark;
    private String inOutFlag;
    private String state;
    private String auditFlag;
    private String currentAuditorId;
    private String currentAuditorName;
    private String copierReturnReason;

    public String getDate() {
        return date;
    }

    public void setDate(String date) {
        this.date = date;
    }

    public String getCompanyId() {
        return companyId;
    }

    public void setCompanyId(String companyId) {
        this.companyId = companyId;
    }

    public String getCompanyName() {
        return companyName;
    }

    public void setCompanyName(String companyName) {
        this.companyName = companyName;
    }

    public String getDepartId() {
        return departId;
    }

    public void setDepartId(String departId) {
        this.departId = departId;
    }

    public String getDepartName() {
        return departName;
    }

    public void setDepartName(String departName) {
        this.departName = departName;
    }

    public String getGoodsId() {
        return goodsId;
    }

    public void setGoodsId(String goodsId) {
        this.goodsId = goodsId;
    }

    public String getSourceUrl() {
        return sourceUrl;
    }

    public void setSourceUrl(String sourceUrl) {
        this.sourceUrl = sourceUrl;
    }

    public String getImageUrl() {
        return imageUrl;
    }

    public void setImageUrl(String imageUrl) {
        this.imageUrl = imageUrl;
    }

    public Integer getCount() {
        return count;
    }

    public void setCount(Integer count) {
        this.count = count;
    }

    public String getTotalPrice() {
        return totalPrice;
    }

    public void setTotalPrice(String totalPrice) {
        this.totalPrice = totalPrice;
    }

    public String getKeeperUserId() {
        return keeperUserId;
    }

    public void setKeeperUserId(String keeperUserId) {
        this.keeperUserId = keeperUserId;
    }

    public String getInUserId() {
        return inUserId;
    }

    public void setInUserId(String inUserId) {
        this.inUserId = inUserId;
    }

    public String getOutUserId() {
        return outUserId;
    }

    public void setOutUserId(String outUserId) {
        this.outUserId = outUserId;
    }

    public String getReceiveUserId() {
        return receiveUserId;
    }

    public void setReceiveUserId(String receiveUserId) {
        this.receiveUserId = receiveUserId;
    }

    public String getKeeperUserName() {
        return keeperUserName;
    }

    public void setKeeperUserName(String keeperUserName) {
        this.keeperUserName = keeperUserName;
    }

    public String getInUserName() {
        return inUserName;
    }

    public void setInUserName(String inUserName) {
        this.inUserName = inUserName;
    }

    public String getOutUserName() {
        return outUserName;
    }

    public void setOutUserName(String outUserName) {
        this.outUserName = outUserName;
    }

    public String getReceiveUserName() {
        return receiveUserName;
    }

    public void setReceiveUserName(String receiveUserName) {
        this.receiveUserName = receiveUserName;
    }

    public String getReceiveDate() {
        return receiveDate;
    }

    public void setReceiveDate(String receiveDate) {
        this.receiveDate = receiveDate;
    }

    public String getReceiveUrl() {
        return receiveUrl;
    }

    public void setReceiveUrl(String receiveUrl) {
        this.receiveUrl = receiveUrl;
    }

    public String getRemark() {
        return remark;
    }

    public void setRemark(String remark) {
        this.remark = remark;
    }

    public String getInOutFlag() {
        return inOutFlag;
    }

    public void setInOutFlag(String inOutFlag) {
        this.inOutFlag = inOutFlag;
    }

    public String getAuditFlag() {
        return auditFlag;
    }

    public void setAuditFlag(String auditFlag) {
        this.auditFlag = auditFlag;
    }

    public String getCurrentAuditorId() {
        return currentAuditorId;
    }

    public void setCurrentAuditorId(String currentAuditorId) {
        this.currentAuditorId = currentAuditorId;
    }

    public String getCurrentAuditorName() {
        return currentAuditorName;
    }

    public void setCurrentAuditorName(String currentAuditorName) {
        this.currentAuditorName = currentAuditorName;
    }

    public String getCopierReturnReason() {
        return copierReturnReason;
    }

    public void setCopierReturnReason(String copierReturnReason) {
        this.copierReturnReason = copierReturnReason;
    }

    public String getInventoryAddress() {
        return inventoryAddress;
    }

    public void setInventoryAddress(String inventoryAddress) {
        this.inventoryAddress = inventoryAddress;
    }

    public String getState() {
        return state;
    }

    public void setState(String state) {
        this.state = state;
    }

    @Override
    public JSONObject getJSONObject() {
        JSONObject obj = new JSONObject();
        obj.put("ID", getId());
        obj.put("DATE", getDate());
        obj.put("COMPANY_ID", getCompanyId());
        obj.put("COMPANY_NAME", getCompanyName());
        obj.put("DEPART_ID", getDepartId());
        obj.put("DEPART_NAME", getDepartName());
        obj.put("GOODS_ID", getGoodsId());
        obj.put("SOURCE_URL", getSourceUrl());
        obj.put("IMAGE_URL", getImageUrl());
        obj.put("COUNT", getCount());
        obj.put("INVENTORY_ADDRESS", getInventoryAddress());
        obj.put("TOTAL_PRICE", getTotalPrice());
        obj.put("KEEPER_USER_ID", getKeeperUserId());
        obj.put("IN_USER_ID", getInUserId());
        obj.put("OUT_USER_ID", getOutUserId());
        obj.put("RECEIVE_USER_ID", getReceiveUserId());
        obj.put("KEEPER_USER_NAME", getKeeperUserName());
        obj.put("IN_USER_NAME", getInUserName());
        obj.put("OUT_USER_NAME", getOutUserName());
        obj.put("RECEIVE_USER_NAME", getReceiveUserName());
        obj.put("RECEIVE_DATE", getReceiveDate());
        obj.put("RECEIVE_URL", getReceiveUrl());
        obj.put("REMARK", getRemark());
        obj.put("IN_OUT_FLAG", getInOutFlag());
        obj.put("STATE", getState());
        obj.put("AUDIT_FLAG", getAuditFlag());
        obj.put("CURRENT_AUDITOR_ID", getCurrentAuditorId());
        obj.put("CURRENT_AUDITOR_NAME", getCurrentAuditorName());
        obj.put("COPIER_RETURN_REASON", getCopierReturnReason());
        return obj;
    }

    @Override
    public String getTableName() {
        return "t_psi_repo_in_out";
    }

    @Override
    public JSONObject getJSONColumns() {
        JSONObject obj = new JSONObject();
        obj.put("ID", "id");
        obj.put("DATE", "date");
        obj.put("COMPANY_ID", "companyId");
        obj.put("COMPANY_NAME", "companyName");
        obj.put("DEPART_ID", "departId");
        obj.put("DEPART_NAME", "departName");
        obj.put("GOODS_ID", "goodsId");
        obj.put("SOURCE_URL", "sourceUrl");
        obj.put("IMAGE_URL", "imageUrl");
        obj.put("COUNT", "count");
        obj.put("INVENTORY_ADDRESS", "inventoryAddress");
        obj.put("TOTAL_PRICE", "totalPrice");
        obj.put("KEEPER_USER_ID", "keeperUserId");
        obj.put("IN_USER_ID", "inUserId");
        obj.put("OUT_USER_ID", "outUserId");
        obj.put("RECEIVE_USER_ID", "receiveUserId");
        obj.put("KEEPER_USER_NAME", "keeperUserName");
        obj.put("IN_USER_NAME", "inUserName");
        obj.put("OUT_USER_NAME", "outUserName");
        obj.put("RECEIVE_USER_NAME", "receiveUserName");
        obj.put("RECEIVE_DATE", "receiveDate");
        obj.put("RECEIVE_URL", "receiveUrl");
        obj.put("REMARK", "remark");
        obj.put("IN_OUT_FLAG", "inOutFlag");
        obj.put("STATE", "state");
        obj.put("AUDIT_FLAG", "auditFlag");
        obj.put("CURRENT_AUDITOR_ID", "currentAuditorId");
        obj.put("CURRENT_AUDITOR_NAME", "currentAuditorName");
        obj.put("COPIER_RETURN_REASON", "copierReturnReason");
        return obj;
    }

}
